<%@ page import="User.Userjson" %>
<%--
  Created by IntelliJ IDEA.
  User: Specter
  Date: 2019/4/17
  Time: 22:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>登录界面</title>
</head>
<body>
<%
    String promt=new String();
    String an;
    Userjson user;
    if(session.getAttribute("user")==null){
        promt="您尚未登录！";
        an="登录";
        user=null;
    }
    else{
        promt="您已经登录！";
        an="退出";
        user=(Userjson) session.getAttribute("user");
    }
%>
<br>
<%=promt%>
<%
    if(user!=null)
    {
        response.getWriter().println("学号："+user.getUsername());
        response.getWriter().println("姓名："+user.getName());
        response.getWriter().println("职业："+user.getGroup());
        response.getWriter().println("学院："+user.getFaculty_title());
    }
%>
<br>

<form  action="/login/dgut" method="post">
    <input type="submit" value="<%=an%>">
</form>

</body>
</html>
